<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引入jquery -->
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
</head>
<body>
    <script>
        // console.log($);
        // console.log(jQuery);
        $.ajax({
            url:'http://39.96.21.48:5588/order/findAll',
            method:'get',
            success:function(res){
                // console.log(res)
                // ES5写法：匿名函数
                var order = res.data.filter(function(item){
                    // console.log(item.status);
                    return item.status == '待接单';
                })
                console.log(order);

                // ES6写法：箭头函数
                var order1 = res.data.filter((item)=>{
                    return item.status == '待接单';
                })
                console.log(order1);
            }
        })

    </script>
</body>
</html>